package com.demo.FactoryBean;

import org.springframework.beans.factory.FactoryBean;
import org.springframework.stereotype.Component;

@Component
public class MyBean implements FactoryBean<Cat> {

    @Override
    public Cat getObject() throws Exception {
        return new Cat("wpz喵");
    }

    @Override
    public Class<?> getObjectType() {
        return Cat.class;
    }
}
